From 1d6f2a8f56f6d7469b81dedafb9429fc926d5c13 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Tue, 30 Aug 2005 17:00:26 +0000 Subject: [PATCH] Some fixes to the performance counters code. Signed-off-by: Ross McIlroy --- tools/misc/cpuperf/cpuperf.c | 14 +++++--------- xen/include/xen/perfc.h | 3 ++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/tools/misc/cpuperf/cpuperf.c b/tools/misc/cpuperf/cpuperf.c index 093cde556d..999c04891a 100644 --- a/tools/misc/cpuperf/cpuperf.c +++ b/tools/misc/cpuperf/cpuperf.c @@ -243,16 +243,12 @@ int main(int argc, char **argv) } if (read) { - while((cpu_mask&1)) { - int i; - for (i=0x300;i<0x312;i++) { - printf("%010llu ",cpus_rdmsr( cpu_mask, i ) ); - } - printf("\n"); - cpu_mask>>=1; - } + int i; + for (i=0x300;i<0x312;i++) + printf("%010llu ",cpus_rdmsr( cpu_mask, i ) ); + printf("\n"); exit(1); - } + } if (!escr) { fprintf(stderr, "Need an ESCR.\n"); diff --git a/xen/include/xen/perfc.h b/xen/include/xen/perfc.h index 48c7e90fb4..e2c9bdd2e8 100644 --- a/xen/include/xen/perfc.h +++ b/xen/include/xen/perfc.h @@ -4,6 +4,7 @@ #ifdef PERF_COUNTERS +#include #include /* @@ -87,7 +88,7 @@ extern struct perfcounter perfcounters; * Histogram: special treatment for 0 and 1 count. After that equally spaced * with last bucket taking the rest. */ -#ifdef PERFC_ARRAYS +#ifdef PERF_ARRAYS #define perfc_incr_histo(_x,_v,_n) \ do { \ if ( (_v) == 0 ) \ -- 2.30.2